/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * articulosListarGUI.java
 *
 * Created on 14/10/2011, 11:53:36
 */

package Devolucion;

import Gastos.*;
import Personas.*;
import java.awt.event.ActionListener;
import java.awt.event.KeyListener;

/**
 *
 * @author nan
 */
public class devolucionListarGUI extends javax.swing.JDialog {

    /** Creates new form articulosListarGUI */
    public devolucionListarGUI(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();

    }

    public devolucionListarGUI(){
        initComponents();
    }

    public void setActionListeners(ActionListener lis){
        this.getjButtonMostrarTodos().addActionListener(lis);
        this.getjButtonEliminar().addActionListener(lis);
        this.getjButtonMostrarCampo().addActionListener(lis);
        this.getjButtonSalir().addActionListener(lis);

    }

    void setKeyListener(KeyListener lis) {
        this.getjTextFieldfechad().addKeyListener(lis);
        this.getjTextFieldfechah().addKeyListener(lis);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        articulosListarGUI1 = new Articulo.articulosListarGUI();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTextFieldfechad = new javax.swing.JTextField();
        jTextFieldfechah = new javax.swing.JTextField();
        jButtonMostrarTodos = new javax.swing.JButton();
        jButtonMostrarCampo = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTablePersona = new javax.swing.JTable();
        jButtonEliminar = new javax.swing.JButton();
        jButtonSalir = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Lista De Devolucion");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Buscar Persona"));

        jLabel1.setText("Fecha Desde");

        jLabel2.setText("Fecha Hasta");

        jTextFieldfechad.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jTextFieldfechah.setFont(new java.awt.Font("Ubuntu", 0, 18));

        jButtonMostrarTodos.setText("Mostrar Todos");

        jButtonMostrarCampo.setText("Mostrar Fecha");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTextFieldfechah)
                    .addComponent(jTextFieldfechad, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonMostrarCampo, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
                    .addComponent(jButtonMostrarTodos, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jTextFieldfechad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonMostrarTodos))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextFieldfechah, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonMostrarCampo))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTablePersona.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "IDGastos", "Descripcion", "Fecha", "Monto"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Double.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTablePersona);

        jButtonEliminar.setText("Eliminar");

        jButtonSalir.setText("Salir");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 912, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jButtonSalir, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
                            .addComponent(jButtonEliminar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButtonEliminar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButtonSalir))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(30, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                devolucionListarGUI dialog = new devolucionListarGUI(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private Articulo.articulosListarGUI articulosListarGUI1;
    private javax.swing.JButton jButtonEliminar;
    private javax.swing.JButton jButtonMostrarCampo;
    private javax.swing.JButton jButtonMostrarTodos;
    private javax.swing.JButton jButtonSalir;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTablePersona;
    private javax.swing.JTextField jTextFieldfechad;
    private javax.swing.JTextField jTextFieldfechah;
    // End of variables declaration//GEN-END:variables


    /**
     * @return the jButtonEliminar
     */
    public javax.swing.JButton getjButtonEliminar() {
        return jButtonEliminar;
    }


    /**
     * @return the jButtonMostrarTodos
     */
    public javax.swing.JButton getjButtonMostrarTodos() {
        return jButtonMostrarTodos;
    }

    /**
     * @return the jTableArticulos
     */
    public javax.swing.JTable getjTableArticulos() {
        return jTablePersona;
    }

    /**
     * @return the jTextFieldCod
     */
    public javax.swing.JTextField getjTextFieldfechad() {
        return jTextFieldfechad;
    }

    /**
     * @return the jTextFieldNombre
     */
    public javax.swing.JTextField getjTextFieldfechah() {
        return jTextFieldfechah;
    }

    /**
     * @return the jButtonMostrarCampo
     */
    public javax.swing.JButton getjButtonMostrarCampo() {
        return jButtonMostrarCampo;
    }

    /**
     * @return the jButtonSalir
     */
    public javax.swing.JButton getjButtonSalir() {
        return jButtonSalir;
    }

}
